A method for projecting a striped pattern in which an amount of light periodically changes on an object to be measured (hereinafter referred to as a target), image-capturing the target, analyzing the striped pattern of the top of the image acquired by the capture, and measuring a three-dimensional shape of the target (a distance to the target) is known.
The measurement method called the phase shift method projects a striped pattern for which the amount of light sinusoidally changes (hereinafter referred to as a sinusoidal pattern) on a target while changing the phase a plurality of times, and captures the target. For example, it obtains three kinds of images by capturing the target after projecting a sinusoidal pattern of a phase shift of 2π/3 and a sinusoidal pattern of a phase shift of 4π/3 in relation to a first sinusoidal pattern. At that time, the phase of each pixel is acquired by processing for calculating, by an arc tangent, pixel values (luminance values) of the same pixel positions in each obtained image. Since the phase corresponds to a projection angle for the projector, the three-dimensional shape of the target can be measured from a triangulation method principle if the position relationship of the projector and image capturing device are known beforehand.
However, for the phase shift method, if there are nonlinearities in an output characteristic of the projector and the image capturing device, projecting/capturing a correct sinusoidal pattern is not possible and an error arises in a phase estimated for each pixel. The result of this is that a stripe error arises in the measurement results of the three-dimensional shape.
Japanese Patent Laid-Open No. 2009-210509 discloses a measurement apparatus which is not dependent on output characteristics of a projector and image capturing device by modulating/combining sinusoidal patterns. S. Zhang. P. S. Huang “Phase error compensation for a 3-D shape measurement system based on the phase-shifting method” Optical Engineering 46(6) dated June, 2007 discloses a correction table which corrects phase errors caused by nonlinearities of output characteristics of a projector and an image capturing device by using a white reference plate of uniform reflectance. Also, T. Zaman “Development of a Topographic Imaging Device” Delft University of Technology dated March, 2013 discloses a measurement method called the stereo phase shift method whose object is to perform a measurement independent of nonlinearities of output characteristics of a projector and image capturing devices by arranging two image capturing devices.
According to the techniques disclosed in the above described documents, suppressing measurement errors due to nonlinearities of output characteristics of a projector and image capturing device is possible. However, causes of an occurrence of measurement errors are not limited to just the nonlinearities of the output characteristics of the projector and the image capturing device. In particular, measurement errors arise due to light intensity fluctuations caused by a light emission timing of the projector or an image capturing timing of the image capturing device in a case when a generic projector and camera are used as the projector and the image capturing device. Regarding such fluctuation due to the emission/image capturing timing, in actuality, fluctuation at a time of measuring the target is unknown and appropriate correction is difficult even if characteristics of the measurement apparatus are obtained by using a white reference plate or the like beforehand.